package com.amkor.web.myhome.dao;

import java.util.List;

import org.springframework.jdbc.core.BeanPropertyRowMapper;

import com.amkor.web.common.dao.AbstractSimpleJdbcDaoSupport;
import com.amkor.web.myhome.domain.Evaluation;

public class EvaluationDaoJdbc extends AbstractSimpleJdbcDaoSupport implements EvaluationDao {
	
	private String PPEVBSP = "PPSLIB.PPEVBSP";
	private String PPEVLHP = "PPSLIB.PPEVLHP";
	
	@SuppressWarnings("deprecation")
	public List<Evaluation> getEvaluationRating(int empid) {
		return simpleJdbcTemplate.query(
				" select EVEVYM as date, EVCTGD as credit, EVCTPT as score " +
				" from "+PPEVBSP+", "+PPEVLHP+
				" where EVCPID = 'ATK' AND EVUNIQ = ? AND ESESST = 'C' AND ESCPID = EVCPID AND ESEVLC = EVEVLC " +
				" AND ESEVYM = EVEVYM AND ESEVLC !='4' ",
				new BeanPropertyRowMapper<Evaluation>(Evaluation.class), empid);
	}
	
}
